﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageMcSigAdmin.master" AutoEventWireup="true" CodeFile="Cargos.aspx.cs" Inherits="Cargos" %>

<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <dx:ASPxGridView ID="ASPxGridViewCargos" runat="server" 
        AutoGenerateColumns="False" DataSourceID="SqlDataSourceCargos" 
        KeyFieldName="ACA_ID" Theme="PlasticBlue">
        <Columns>
            <dx:GridViewCommandColumn VisibleIndex="0" Caption="Opciones">
                <EditButton Visible="True">
                </EditButton>
                <NewButton Visible="True">
                </NewButton>
                <DeleteButton Visible="True">
                </DeleteButton>
                <ClearFilterButton Visible="True">
                </ClearFilterButton>
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="ACA_ID" ReadOnly="True" VisibleIndex="1" 
                Caption="Id">
                <EditFormSettings Visible="False" />
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="ACA_NOMBRE_CARGO" VisibleIndex="2" 
                Caption="Nombre">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior ConfirmDelete="True" />
        <Settings ShowFilterRow="True" />
    </dx:ASPxGridView>
    <asp:SqlDataSource ID="SqlDataSourceCargos" runat="server" 
        ConnectionString="<%$ ConnectionStrings:MCSIGConnectionString %>" 
        DeleteCommand="DELETE FROM [AUT_CARGOS] WHERE [ACA_ID] = @ACA_ID" 
        InsertCommand="INSERT INTO [AUT_CARGOS] ([ACA_NOMBRE_CARGO]) VALUES (@ACA_NOMBRE_CARGO)" 
        SelectCommand="SELECT * FROM [AUT_CARGOS]" 
        UpdateCommand="UPDATE [AUT_CARGOS] SET [ACA_NOMBRE_CARGO] = @ACA_NOMBRE_CARGO WHERE [ACA_ID] = @ACA_ID">
        <DeleteParameters>
            <asp:Parameter Name="ACA_ID" Type="Decimal" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="ACA_NOMBRE_CARGO" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="ACA_NOMBRE_CARGO" Type="String" />
            <asp:Parameter Name="ACA_ID" Type="Decimal" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>

